package com.shuzhi.dataway.udf;

import com.shuzhi.dataway.dao.User;
import com.shuzhi.dataway.service.impl.UserServiceImpl;
import net.hasor.dataql.DimUdfSource;
import net.hasor.dataql.UdfSourceAssembly;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Siyuan.mlq
 * @version 1.0
 * @description
 * @since 2020/10/21
 */
@Component
@DimUdfSource("userUtil")
public class UserUtil implements UdfSourceAssembly {
  @Resource private UserServiceImpl userService;

  public String getName() {
    return userService.getName();
  }

  public List<User> getUsers() {
    return userService.userList();
  }
}
